package com.yunji.storage.service.impl;

import com.yunji.storage.bo.RepairRemoveBO;
import com.yunji.storage.bo.RepairSelectQueryBO;
import com.yunji.storage.bo.StorageUpdateAuditBO;
import com.yunji.storage.dao.IRepairTicketDao;
import com.yunji.storage.domain.RepairTicketDO;
import com.yunji.storage.service.IRepairTicketService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.service.impl
 * @Title: RepairTicketServiceImpl
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-08-27 19:55:41      V1.0        HuaAo       新建类
 */
@Service
public class RepairTicketServiceImpl implements IRepairTicketService {

    @Resource
    IRepairTicketDao repairTicketDao;

    @Override
    public boolean deleteByTicket(RepairRemoveBO bo) {
        return repairTicketDao.deleteByTicket(bo);
    }

    @Override
    public boolean create(RepairTicketDO repairTicket) {
        return repairTicketDao.create(repairTicket);
    }

    @Override
    public RepairTicketDO select(Long repairId) {
        return repairTicketDao.getById(repairId);
    }

    @Override
    public RepairTicketDO select(RepairSelectQueryBO bo) {
        return repairTicketDao.selectVO(bo);
    }

    @Override
    public boolean update(RepairTicketDO repairTicket) {
        return repairTicketDao.updateTicket(repairTicket);
    }

    @Override
    public boolean deleteDraft(Long... repairIds) {
        return repairTicketDao.deleteDraft(repairIds);
    }

//    @Override
//    public Integer countRepair(RepairCountBO bo) {
//        return repairTicketDao.countRepair(bo);
//    }

    @Override
    public void resetAuditStatus(Long repairId) {
        repairTicketDao.resetAuditStatus(repairId);
    }

    @Override
    public boolean updateAuditStatus(StorageUpdateAuditBO auditBO) {
         return repairTicketDao.updateAuditStatus(auditBO);
    }
}